package com.itheima.springbootcondition;

import com.itheima.springbootcondition.config.UserConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Import;


@SpringBootApplication
public class SpringbootConditionApplication {


    public static void main(String[] args) {

        //springboot启动方法,返回spring的IOC容器
        ConfigurableApplicationContext context = SpringApplication.run(SpringbootConditionApplication.class, args);

        Object user = context.getBean("user");
        System.out.println(user);


        Object role = context.getBean("role");
        System.out.println(role);
    }

}
